/**
 * Author(s): xuming.Wong <xuming.Wong@gmail.com>
 */

#ifndef __LOGGER_H__
#define __LOGGER_H__

#include "NgPrerequisites.h"
#include <stdio.h>

namespace PQEngine
{
	class Logger
	{
	private:
		FILE* loGNativeFile;
	public:
		Logger();
		static Logger &getSingleton();

		FILE* openLoGNativeFile(char const* confiGNativeFileName,char const* configTimeStampFlag, char const* mode);
		
		void outError(const char * err, ...);
		void out(const char * str, ...);
		void outDebug(const char * str, ...);
		void outBasic(const char * str, ...);
		void outDetail(const char * str, ...);
		void outErrorDb(const char * str, ...);
		void outDB();
		void outLine();
		void outTimestamp(FILE* file);

	};

	#ifdef PROGRAM_DEBUG
	#define DEBUG_LOG GNgLog.outDebug
	#else
	#define DEBUG_LOG
	#endif

#define GNgLog PQEngine::Logger::getSingleton() 
}
#endif
